package c03;

class Animal02{
    private String name;
    private int age;
    public String getName(){
        return  name;
    }
    public void setName(String name){
        this.name= name;
    }
    public  int getAge(){
        return age;
    }
    public  void  setAge(int age){
        this.age = age;
    }
}
class Dog02 extends Animal02{

}
public class c1 {
    public static void main(String[] args) {
        Dog02 dog = new Dog02();
        dog.setName("牧羊犬");
        dog.setAge(3);
        System.out.println("名称："+dog.getName()+",年龄:"+dog.getAge());
    }
}
